package cn.com.yx.ms.service;


import cn.com.yx.ms.application.web.ApiPager;
import cn.com.yx.ms.application.web.ApiQueryBase;
import cn.com.yx.ms.domain.TestModel;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

/**
 * 应用中心接口
 */
@Component
public interface ITestService {

    @Cacheable(value = {"redis"}, key = "'testmodel:'.concat(#id)", unless = "#result == null")
    TestModel findOne(String id);

    int insert(TestModel testModel);

    int delete(String id);

    int update(TestModel testModel);

    ApiPager<TestModel> find(ApiQueryBase apiQueryBase);

}